package com.unbox.admin.entity;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

import javax.validation.constraints.NotEmpty;
import java.io.Serializable;
import java.time.LocalDateTime;
import java.util.List;

/**
 * <p>
 * 管理员表
 * </p>
 *
 * @author jobob
 * @since 2021-01-26
 */
@Data
@EqualsAndHashCode(callSuper = false)
@TableName("unbox_user")
@ApiModel(value = " UnboxUser", description = "用户表")
public class UnboxUser implements Serializable {

    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.AUTO)
    @ApiModelProperty(value = "标识列", name = "id")
    private Integer id;
    @ApiModelProperty(value = "姓名", name = "name")
    private String name;
    @ApiModelProperty(value = "账号", name = "userName")
    private String userName;
    @ApiModelProperty(value = "密码", name = "passWord")
    private String passWord;
    @ApiModelProperty(value = "登录时间", name = "loginTime")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime loginTime;
    @ApiModelProperty(value = "登录次数", name = "loginNum")
    private Integer loginNum;
    @ApiModelProperty(value = "用户状态", name = "userState")
    private Integer userState;
    @ApiModelProperty(value = "用户状态", name = "stats")
    private Integer stats;
    @ApiModelProperty(value = "创建时间", name = "createTime")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime createTime;
    @TableField(exist = false)
    private List<Role> roleList;
    @TableField(exist = false)
    private List<String> authoritys;
}
